package jmu.edu.yjc.service;

import com.baomidou.mybatisplus.extension.service.IService;
import jmu.edu.yjc.domain.ResponseResult;
import jmu.edu.yjc.domain.entity.Message;
import jmu.edu.yjc.domain.vo.PageVo;
import jmu.edu.yjc.domain.vo.message.UnreadVo;

import java.util.List;
import java.util.Map;


/**
 * 消息记录表(Message)表服务接口
 *
 * @author makejava
 * @since 2023-01-20 19:09:47
 */
public interface MessageService extends IService<Message> {

    Message getLassMessageById(Long fromUserId, Long toUserId);

    PageVo getMessages(Integer pageNumber,Integer pageSize, Long userId, Long toUserId);

    Integer getUnread(Long fromUserId, Long toUserId);
    Integer getTotalUnread(Long id);

    void updateMessageIsCheck(String string);

    ResponseResult addMessage(String message);

    ResponseResult getUnreadContractByID(Long id);

    Map<Long,UnreadVo> getUnreadList(Long id);

}

